<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        /*div=margin+outline+border+pading+width=父容器的width*/

        /*width/height/margin=auto*/
        .div01 {
            width: 500px;
            height: 200px;
            background: red;
            /*margin-left: 100px;*/
            padding-left: 20px;
            outline: 10px solid yellow;
            border: 20px solid blue;
            margin: 0 auto;
        }
        .div02{
            width: 500px;
            height: 100px;
            background: grey;
        }

        .div03{
            width: 100px;
            height: 100px;
            background: blue;
        }

       img{
           margin: 0 auto;
       }

    </style>
</head>
<body>
    <div class="div01">hello</div>

    <img src="images/1.jpg" alt="">
    <!--<div class="div02">-->
        <!--<div class="div03">div03</div>-->
        <!--<div class="div04">div03</div>-->
    <!--</div>-->
</body>
</html>